/*
 * @Author: N0ts
 * @Date: 2021-10-08 00:37:27
 * @LastEditTime: 2022-01-06 11:29:55
 * @Description: main
 * @FilePath: /eazy-gitee-note/css/main.css
 * @Mail：mail@n0ts.cn
 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    word-break: break-all;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: text !important;
}

[v-cloak] {
    display: none;
}

html,
body,
#app,
.el-container {
    height: 100%;
}

a {
    text-decoration: none;
    color: black;
}

img {
    max-width: 100%;
    max-height: 400px;
    cursor: pointer;
}

code {
    white-space: pre-wrap;
}

.language-js span,
code,
code * {
    font-family: "Fira Code" !important;
}

/* 统一过渡 */
.treesItem,
.bottomMenu > div::before,
.leftMenu,
.main,
.content,
.peBlackHide,
.contentItem,
.content a::after,
.editorMenu i,
.editor {
    transition: all 0.3s ease-in-out;
    -webkit-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    -ms-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
}

/* 按钮过渡 */
.bottomMenu > div,
img {
    transition: all 0.1s ease-in-out;
    -webkit-transition: all 0.1s ease-in-out;
    -moz-transition: all 0.1s ease-in-out;
    -ms-transition: all 0.1s ease-in-out;
    -o-transition: all 0.1s ease-in-out;
}

/* 主体 */
.main {
    height: 100%;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* 左侧 */
.leftMenu {
    width: 0;
    min-width: 0;
    max-width: 350px;
    position: relative;
    height: 100%;
    z-index: 2;
}

.leftMenuHide {
    width: 30%;
    min-width: 230px;
}

.el-tabs,
.el-tabs__content,
.el-tab-pane {
    height: calc(100% - 20px);
}

/* 菜单 */
.el-icon-arrow-left:before,
.el-icon-arrow-right:before,
.el-tabs__nav-wrap::after {
    visibility: hidden;
}

.leftMenuHide .el-icon-arrow-left:before,
.leftMenuHide .el-icon-arrow-right:before,
.leftMenuHide .el-tabs__nav-wrap::after {
    visibility: inherit;
}

.el-tabs__header {
    padding: 0 20px;
    box-sizing: border-box;
}

/* 文件树 */
.el-tab-pane {
    overflow-y: scroll;
}

/* 文件列表头部 */
.treesHead {
    margin: 0 0 5px 15px;
}

/* 文件列表 */
.treesItem {
    padding: 8px 5px 8px 30px;
    box-sizing: border-box;
    cursor: pointer;
    opacity: 0.5;
}

/* 目录 */
.contentTrees {
    padding: 0 15px;
}

.contentItem {
    padding: 5px;
    cursor: pointer;
    opacity: 0.5;
}

.contentTrees .H2 {
    padding-left: 20px;
}

.contentTrees .H3 {
    padding-left: 30px;
}

.contentTrees .H4 {
    padding-left: 40px;
}

/* 手机端遮罩 */
.peBlack {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    background: transparent;
    display: none;
}

.peBlackHide {
    opacity: 1;
    visibility: initial;
    background: rgba(0, 0, 0, 0.3);
}

/* 内容 */
.body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
}

/* 编辑器 */
.editor {
    min-width: 0;
    width: 0;
    height: 100%;
    background-color: var(--bg-color);
    box-shadow: 3px 0 3px rgba(0, 0, 0, 0.2);
    z-index: 1;
    color: var(--text-color1);
    overflow: hidden;
}

.editorShow {
    min-width: 45%;
}

.editorMenu {
    border-bottom: 2px solid var(--bg-color5);
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.editorMenu i {
    padding: 10px;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    cursor: pointer;
}

.editorMenu i:hover {
    background: var(--menu-hover);
}

.editor > textarea {
    width: 100%;
    height: 100%;
    padding: 50px;
    box-sizing: border-box;
    overflow-y: scroll;
    font-size: 1rem;
    border: none;
    background: transparent;
    color: var(--text-color1);
}

/* 文章内容 */
.content {
    width: 100%;
    height: 100%;
    padding: 0 80px 50px;
    box-sizing: border-box;
    overflow-y: scroll;
}

/* 加载 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading p::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    background-color: black;
    margin: 10px auto;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    animation: loading 0.8s ease-in-out infinite;
    -webkit-animation: loading 0.8s ease-in-out infinite;
}

@keyframes loading {
    0% {
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }

    50% {
        transform: scale(1.5);
        -webkit-transform: scale(1.5);
        -moz-transform: scale(1.5);
        -ms-transform: scale(1.5);
        -o-transform: scale(1.5);
    }

    100% {
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }
}

/* 底部菜单 */
.bottomMenu {
    position: absolute;
    bottom: 20px;
    right: 0;
    z-index: 2;
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
    -moz-transform: translateX(100%);
    -ms-transform: translateX(100%);
    -o-transform: translateX(100%);
}

.bottomMenu > div {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    cursor: pointer;
    border-radius: 0 20px 20px 0;
    -webkit-border-radius: 0 20px 20px 0;
    -moz-border-radius: 0 20px 20px 0;
    -ms-border-radius: 0 20px 20px 0;
    -o-border-radius: 0 20px 20px 0;
}

.bottomMenu > div:active {
    transform: scale(0.9);
    -webkit-transform: scale(0.9);
    -moz-transform: scale(0.9);
    -ms-transform: scale(0.9);
    -o-transform: scale(0.9);
}

.bottomMenu > div::before {
    content: attr(content);
    display: block;
    position: absolute;
    right: 0;
    white-space: nowrap;
    transform: translateX(80%);
    -webkit-transform: translateX(80%);
    -moz-transform: translateX(80%);
    -ms-transform: translateX(80%);
    -o-transform: translateX(80%);
    opacity: 0;
    padding: 3px 10px;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
}

.bottomMenu > div:hover::before {
    transform: translateX(110%);
    -webkit-transform: translateX(110%);
    -moz-transform: translateX(110%);
    -ms-transform: translateX(110%);
    -o-transform: translateX(110%);
    opacity: 1;
}

.bottomMenu i {
    font-size: 1.2rem;
}

@media screen and (max-width: 820px) {
    .leftMenu {
        position: absolute;
        z-index: 2;
    }

    .content {
        padding: 50px 10%;
    }

    .peBlack {
        display: block;
    }
}

@media screen and (max-width: 450px) {
    .leftMenuHide {
        width: 80%;
        min-width: 230px;
    }

    .content {
        padding: 50px 5%;
    }
}

/* 代码块 */
pre {
    position: relative;
}

pre code ul {
    list-style: decimal;
}

pre code ul li {
    padding-left: 10px;
}

/* 图片查看背景模糊 */
.viewer-backdrop {
    backdrop-filter: blur(20px);
}
